import type {TableHeader , operationInstance , siderInstance} from "./@types";

/**默认配置信息*/ 
const defaultProps = {
    /**操作栏 配置 ['edit' , 'detail' , 'delete']*/
    operation: {
        type: Array<operationInstance>,
        default: () => {
            return [];
        },
    },
    /**表格 显示配置*/
    tableHeader: {
        type: Array<TableHeader>,
        default: () => {
            return [];
        },
    },
    /**是否显示 复选框*/
    showCheckbox: {
        type: Boolean,
        default: () => {
            return false;
        },
    },
    /**每条 最大显示数量*/
    maxSize: {
        type: Number,
        default: () => {
            return 10;
        },
    },
    /**分页 总数*/
    total: {
        type: Number,
        default: () => {
            return 0;
        },
    },
    /**是否显示 分页*/
    showPage: {
        type: Boolean,
        default: () => {
            return true;
        },
    },
    /**分页位置*/ 
    footerPosition: {
        type: String,
        default: "right"
    },
    /**操作项配置信息*/
    operationOption: {
        type: Object,
        default: () => {
            return {};
        },
    },
    /**表单自定义 同 el-table一样*/
    tableOptions: {
        type: Object,
        default: () => {
            return {};
        },
    },
    /**表格数据*/
    list: {
        type: Array<Record<string, any>>,
        default: () => {
            return [];
        },
    },
    /**加载中*/
    loading: {
        type: Boolean,
        default: () => {
            return false;
        },
    },
    /**高度*/
    height: {
        type:  [Number, String],
        default: () => {
            return "56vh";
        },
    },
    /**是否显示侧边栏*/
    showSider: {
        type: Boolean,
        default: () => {
            return true;
        },
    },
    /**是否显示操作栏*/
    showOperation : {
        type: Boolean,
        default: () => {
            return true;
        },
    },
    /**强制搜索*/
    forceSearch : {
        type: Boolean,
        default: () => {
            return false;
        },
    },
    /**侧边栏显示列表*/
    showSiders : {
        type : Array<siderInstance>,
        default : () =>{
            return ['search','column','height']
        }
    },
    border : {
        type : Boolean,
        default : () => {
            return false
        }
    }
};

export default defaultProps;